package com.prize.enums;

/**
 * @descriptions:
 * @author: yunqiang
 * @date: 2022/5/28 17:13
 */
public enum CodeEnum {

    USER_NOT_AUTH(501,"用户名或密码错误"),
    USER_NOT_PASSWORD(502,"密码错误5次，请5分钟后再登录"),
    ROLE_EXIST(501,"角色名称已存在"),
    ERROR_CAPTCHA(501,"验证码错误"),
    ERROR_PERMISSION(401,"无权限访问"),
    ERROR_LOGIN(401,"请登录"),
    ERROR_PARAMETER(412,"请求参数不正确"),
    NO_RESULT(503,"查询无结果"),
    ERROR_PARAMETE(501,"请求参数为空"),
    SUCCESS(200,"操作成功"),
    USER_EXIST(501,"用户名已存在"),
    ERROR_OLDPASSWORD(501,"旧密码错误"),
    ERROR_PHONE(501,"手机号已存在"),
    METER_TYPE(01,"表计识别"),
    INFRARED_TYPE(02,"红外测温"),
    CYCLE_TASK_TYPE(01,"周期任务"),
    TEMPORARY_TASK_TYPE(02,"定期任务"),
    REALTIME_TASK_TYPE(03,"实时任务"),
    TASK_CONFLICT(507,"该任务执行期间存在其他任务，是否继续创建任务!"),
    ERROE(500,"系统异常");

    Integer code;
    String errorMessage;

    CodeEnum(int code, String errorMessage){
        this.code = code;
        this.errorMessage = errorMessage;
    }

    public int getCode() {
        return code;
    }

    public String getErrorMessage() {
        return errorMessage;
    }
}
